package com.sasis.webapp.dwr;

import com.sasis.model.FlightAdjustProtect;
import com.sasis.service.FlightAdjustProtectManager;
import com.sasis.util.CopyUtil;
import com.sasis.util.DateUtil;
import com.sasis.webapp.form.FlightAdjustProtectForm;

public class FlightAdjustProtectRemote {
	private FlightAdjustProtectManager flightAdjustProtectManager;

	public void setFlightAdjustProtectManager(
			FlightAdjustProtectManager flightAdjustProtectManager) {
		this.flightAdjustProtectManager = flightAdjustProtectManager;
	}
	public boolean saveProtect(FlightAdjustProtectForm flightAdjustProtectForm){
		FlightAdjustProtect flightAdjustProtect=new FlightAdjustProtect();
		
		java.util.Calendar c = java.util.Calendar.getInstance();
	       String sysDate = DateUtil.parseToString(c.getTime(),
	               DateUtil.yyyyMMddHHmmss);
	       flightAdjustProtectForm.setOperatDate(sysDate);
	   CopyUtil.copy(flightAdjustProtectForm, flightAdjustProtect);
	   flightAdjustProtectManager.saveFlightAdjustProtect(flightAdjustProtect);
		return true;
	}
	
}
